package com.sunshine.androidjavapractise.provider;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class DataOpenHelper extends SQLiteOpenHelper {
    private static final String TAG = DataOpenHelper.class.getSimpleName();
    private static final String DATA_NANE = "mytest.db";
    private static int version = 1;

    public DataOpenHelper(Context context) {
        super(context, DATA_NANE, null, version);
    }


    @Override
    public void onCreate(SQLiteDatabase db) {
        String sql = "create table student (id integer primary key autoincrement, name varchar(64), address varchar(64))";
        db.execSQL(sql);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
